home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Sound / SndPlayDoubleBuffer / _headers / SND.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-15  |  1.5 KB  |  57 lines  |  [TEXT/CWIE]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    Header file for routines demonstrating how to parse 'snd ' resource files.
  5. **
  6. **    by Mark Cookson, Apple Developer Technical Support
  7. **
  8. **    File:    SND.h
  9. **
  10. **    Copyright ©1996 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "Apple Sample
  17. **    Code" after having made changes. If you're going to re-distribute the
  18. **    source, we require that you make it clear in the source that the code
  19. **    was descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __SND__
  23. #define __SND__
  24.  
  25. #include <Resources.h>
  26. #include <Sound.h>
  27. #include <SoundComponents.h>
  28. #include <SoundInput.h>
  29.  
  30. #ifndef __SETUPDBHEADER__
  31. #include "SetupDBHeader.h"
  32. #endif
  33.  
  34. #ifndef __READRESOURCE__
  35. #include "ReadResource.h"
  36. #endif
  37.  
  38. #ifndef __DEFINES__
  39. #include "Defines.h"
  40. #endif
  41.  
  42. typedef union {
  43.     SoundHeaderPtr            standardHeaderPtr;
  44.     ExtSoundHeaderPtr        extendedHeaderPtr;
  45.     CmpSoundHeaderPtr        compressedHeaderPtr;
  46. }headerTemplate, *headerTemplatePtr;
  47.  
  48.         OSErr    ASoundGetSNDHeader        (SoundInfoPtr theSoundInfo,
  49.                                         long *dataStart,
  50.                                         long *length);
  51.  
  52.         OSErr    MyParseSndHeader        (SndListHandle theSoundHeader,
  53.                                         SoundComponentData *sndInfo,
  54.                                         unsigned long *numFrames,
  55.                                         unsigned long *dataOffset);
  56.  
  57. #endif